package com.uuah.server.transport.retry;

/**
 *
 * TODO comment ...
 *
 * <p>
 * update record:updator，update time，update content and version
 * </p>
 *
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-27 下午02:48:11
 * @version 1.0.0
 */
public class PolicyStatus {
	private boolean exhausted = false;
	private boolean ok = false;
	private Throwable throwable;

	public static PolicyStatus policyExhausted(Throwable t) {
		return new PolicyStatus(true, t);
	}

	public static PolicyStatus policyOk() {
		return new PolicyStatus();
	}

	protected PolicyStatus() {
		this.ok = true;
	}

	protected PolicyStatus(boolean exhausted, Throwable throwable) {
		this.exhausted = exhausted;
		this.throwable = throwable;
	}

	public boolean isExhausted() {
		return exhausted;
	}

	public boolean isOk() {
		return ok;
	}

	public Throwable getThrowable() {
		return throwable;
	}
}
